package com.example.lx6_1.login

import androidx.lifecycle.MutableLiveData
import com.example.base.entity.LoginEntity
import com.example.base.mvvm.BaseViewModel
import com.example.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class LoginViewModel @Inject constructor(val apiService: ApiService) : BaseViewModel() {

    val loginData = MutableLiveData<LoginEntity>()

    fun getLogin(username:String,password:String){
        httpRequest({apiService.getLogin(username, password)},loginData::postValue)
    }

}